package com.zygame.sdk.view.dialog;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.zygame.sdk.ConstantValue;
import com.zygame.sdk.bean.ZY_Toolbar;
import com.zygame.sdk.utils.res.ResourceUtil;
import com.zygame.sdk.view.web.ZY_Act_WebView;

/**
 * Created by YuXL on 2017/10/12.
 * 忘记密码
 */

public class ZY_Dialog_ForgetPwd extends ZY_BaseDialog {
    private Context mContexet ;
    public ZY_Dialog_ForgetPwd(Context context) {
        super(context);
        this.mContexet = context;
    }

    @Override
    protected void init() {
        showBack(true);
        showClose(true);
        TextView  tv_email  = (TextView) findViewById(ResourceUtil.getId(mContext,"tv_email"));
        tv_email.setOnClickListener(this);
    }

    @Override
    protected String getResourceStr() {
        return "zy_dia_forgot";
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        int id = v.getId();
        if(id == ResourceUtil.getId(mContext,"tv_email")){
            Intent intent = new Intent(mContext, ZY_Act_WebView.class);
            ZY_Toolbar main = new ZY_Toolbar("","","","http://wap.zy1game.com/forget_password.html","");
            intent.putExtra(ConstantValue.TOOLBARFLAG,main);
            mContexet.startActivity(intent);
//            ZY_Toolbar main = getIntent().getParcelableExtra(ConstantValue.TOOLBARFLAG);
        } else if (id == ResourceUtil.getId(mContext,"btn_back") ) {
            new ZY_Dialog_Login(mContext).show();
            dismiss();

        }
    }
}
